home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / hc1_2_x / popupmen.sit / PopUpMenu 2.0b2 / card_5314.txt < prev    next >
Text File  |  1989-09-13  |  3KB  |  125 lines

  1. -- card: 5314 from stack: in.0b2
  2. -- bmap block id: 0
  3. -- flags: 4000
  4. -- background id: 3155
  5. -- name: 
  6. ----- HyperTalk script -----
  7. -----------------------------------------------------------------------
  8. -- openCard
  9. -----------------------------------------------------------------------
  10. on openCard
  11.   global icon, icons
  12.  
  13.   put "^A┬áStrung out┬á,^B┬áon turbulence┬á,^C┬á& Fear┬á" into icons
  14.   put 3 into icon
  15.  
  16.   set icon of card button "Example" to 272 + icon
  17.  
  18.   pass openCard
  19. end openCard
  20.  
  21.  
  22. -----------------------------------------------------------------------
  23. -- doPopUp
  24. -----------------------------------------------------------------------
  25. on doPopUp
  26.   global icon, icons
  27.  
  28.   get PopUpMenu( icons, icon )
  29.  
  30.   if it is not empty then
  31.     put it into icon
  32.     set icon of the target to 272 + it
  33.   end if
  34. end doPopUp
  35.  
  36.  
  37.  
  38. -- part 2 (button)
  39. -- low flags: 00
  40. -- high flags: A004
  41. -- rect: left=234 top=167 right=227 bottom=303
  42. -- title width / last selected line: 0
  43. -- icon id / first selected line: 275 / 275
  44. -- text alignment: 1
  45. -- font id: 0
  46. -- text size: 12
  47. -- style flags: 0
  48. -- line height: 16
  49. -- part name: Example
  50. ----- HyperTalk script -----
  51. on mouseDown
  52.   doPopUp
  53. end mouseDown
  54.  
  55.  
  56. -- part 3 (button)
  57. -- low flags: 00
  58. -- high flags: 2000
  59. -- rect: left=36 top=128 right=153 bottom=65
  60. -- title width / last selected line: 0
  61. -- icon id / first selected line: 21676 / 21676
  62. -- text alignment: 1
  63. -- font id: 0
  64. -- text size: 12
  65. -- style flags: 0
  66. -- line height: 16
  67. -- part name: New Button
  68. ----- HyperTalk script -----
  69. on mouseUp
  70.   show card field "ICON Table"
  71. end mouseUp
  72.  
  73.  
  74.  
  75. -- part 1 (field)
  76. -- low flags: 81
  77. -- high flags: 2004
  78. -- rect: left=93 top=56 right=273 bottom=283
  79. -- title width / last selected line: 0
  80. -- icon id / first selected line: 0 / 0
  81. -- text alignment: 0
  82. -- font id: 4
  83. -- text size: 9
  84. -- style flags: 0
  85. -- line height: 12
  86. -- part name: ICON Table
  87. ----- HyperTalk script -----
  88. on mouseUp
  89.   hide the target
  90. end mouseUp
  91.  
  92.  
  93. -- part contents for background part 10
  94. ----- text -----
  95. Icons
  96.  
  97. To include an icon to the left of an item prefix the text of the item with a circumflex (^) followed by an ASCII character.  The ordinal value of this character plus 208 is the resource id of the ICON to use.
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108. -- part contents for card part 1
  109. ----- text -----
  110. The table below lists some of the ASCII Charcater,ICON number combinations.
  111.  
  112. ^A = 273  ^N = 286  ^1 = 257
  113. ^B = 274  ^0 = 287  ^2 = 258
  114. ^C = 275  ^P = 288  ^3 = 259
  115. ^D = 276  ^Q = 289  ^4 = 260
  116. ^E = 277  ^R = 288  ^5 = 261
  117. ^F = 278  ^S = 290  ^6 = 262
  118. ^G = 279  ^T = 291  ^7 = 263
  119. ^H = 280  ^U = 292  ^8 = 264
  120. ^I = 281  ^V = 293  ^9 = 265
  121. ^J = 282  ^W = 294   
  122. ^K = 283  ^X = 295    
  123. ^L = 284  ^Y = 296    
  124. ^M = 285  ^Z = 297   
  125.